<?php

class newsview extends content
{
   var $category_parent;
	var $articles;
	var $items;

	
	function newsview()
	{
		mp('loading newsview');
	}
	
	
	function digest()
	{
		global $conf;

		
		
		$category=new content_category();
		$category->where['id']=$conf->qm[1];
		$category->get_category();
		mp('got category');
		$this->get_videos($category->piece['id']);
		if($category->piece['type']=='video' && $category->piece['status']=='enabled')
		{
			mp('enabled video');
			$serial=unserialize($category->piece['serial']);
			$conf->style['masthead']=$category->piece['name'];
			$conf->style['background'].='background-image:url('.ap($serial["serial_style_background_image"]).');';
			$conf->style['background'].='background-color:#'.$serial["serial_style_background_color"].';';
			$conf->style['custom-masthead']=='color:#'.$serial["serial_style_masthead_color"].';';
			mp(ap($category->piece['image']));
				
				if(!empty($category->piece['image']))
				{
					$conf->style['masthead']='<img src="'.ap($category->piece['image']).'"/>';
				}
			
		}
		
			$this->display=TRUE;
			$this->category_parent = $category->piece;
			$conf->page_render='assets/pages/newsview.php';

	}
	function get_items()
	{
		mp('grab items');
		$this->items=$this->get_posts('','date');
	}
	

	

	

}
